Talk:FindReplace 2.js
Here's a relatively complete version of FindReplace.Shadow. It still doesn't replace, but it's able to find stuff. You can test this code at w:c:pecoes:Test3 Here's a (probably incomplete) list of known bugs / missing features: * everything was tested in Firefox only- If it works on firefox it will work in chrome ''-- I would hope so, but... well... -- ''It does work in chrome :) * replacing doesn't work - There's not even any code for it''- Thats my job :) -- In this design the dialog and the shadow are in separate modules. As such they should be as independent as possible. The dialog should not manipulate the text but delegate that to the shadow. * there's no i18n of any sort- ''I personally am not going to make this multilingual right now, I'd rather add new features -- ''English isn't my native language. i18n ranks pretty high on my priority list. But what new features are you talking about? -- ''Ok, I'll look into this now that you've brought it up like that- other features were the rest of this list ;) * the tab-order of the dialog could be better- tabindexes aren't the most important thing right now for me, per the i8n logic -- ''Agreed. This is the last thing on my priority list as well. * the first launch of the editor depends on unknown events- ''We don't really need this though... ''Oh, absolutely. It's not possible to plug anything into the source editor, while it's still loading or before the user has switched to source mode. Have you looked at that ugly clutch I wrote to mimick those events? *shudder* -- ''Could we run a regexp on console logs? * the toolbar code probably breaks on sites that use custom toolbar buttons of their own- It doesn't -- ''I hope so. I'll run a few tests... * past finds and replaces should be available as autocomplete options- ''Already a browser preference --'' Good point. * it would be nice to have a way of switching between dialog and textarea by keyboard shortcut (Ctrl-Space maybe)- ''Done -- I'll check it out! * the regex modifiers don't fit nicely into the dialog- ?? --- That's just a little layout thing. Those two checkboxes should fit into the same space the three radio buttons use. * when opening the dialog the currently selected part in the textarea should be inserted into the find-input- I've experimented and it doesn't work but I'll keep looking -- ''No. It doesn't work. There's no code for this yet. -- ''No sorry, I tried it not here, but in Mediawiki:FindReplace/dev.js earlier * to fit into the surrounding site the dialog should try to adopt the site's color scheme * every color should be overridable by a configuration setting- Perhaps window. or a $.extend pecoes 16:37, April 21, 2012 (UTC) -- pecoes 17:21, April 21, 2012 (UTC) :Added my comments onto your points. -- [[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 05:11, April 22, 2012 (UTC) ::So did I :) -- pecoes 05:43, April 22, 2012 (UTC) :::responded back onto your concerns -- [[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 16:52, April 22, 2012 (UTC) ::::Btw I just wanted to say that this code is REALLY good- ill integrate the find and shadow functions really soon into the Mediawiki:FindReplace.js/dev.js (not because that's a fork but because, I want the code to be object oriented completely so I'm merging it all together and making it object oriented ;) ). Thanks! Oh and plus, you can edit both Mediawiki:FindReplace.js and /dev.js if you want to. Thanks, --[[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 17:01, April 22, 2012 (UTC) :::::Alright. I didn't notice that file. I only checked out MediaWiki:FindReplace.js. -- pecoes 22:02, April 22, 2012 (UTC) Next Version *The code was refactored to be a little clearer and more readable. *The keyboard shortcuts (Ctrl+F, Ctrl+G, Ctrl+Return and Ctrl+Space) work now *The shadow scrolls along with the textarea now. There's still a nasty bug, though, that I just can't seem to figure out. The shadow always seems to fall one character short... pecoes 22:00, April 22, 2012 (UTC) -- pecoes 22:02, April 22, 2012 (UTC)